import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Row, Col, Card ,DatePicker,Table,Tag} from 'antd'
import { color } from 'utils'
import { NumberCard } from './components'
import styles from './index.less'
import List from './List'
const { MonthPicker, RangePicker } = DatePicker

const Dashboard = ({ location, dispatch, dashboard, loading }) => {
	const {  numbers,sumList,countList } = dashboard
	const numberCards = numbers.map((item, key) => (
		<Col key={key} lg={6} md={12}>
	    	<NumberCard {...item} />
	  	</Col>
	 ))
	 const onChange=(date, dateString)=>{
	 	const startAt=dateString[0]
	 	const endAt=dateString[1]
	 	dispatch({
	 		type: 'dashboard/query',
        	payload: {
        		startAt,
        		endAt
        	},
	 	})
	 }
    return (
      <div className="content-inner" style={{backgroundColor:'transparent',padding:0}}>
      	{/*<Row gutter={24}>
        	{numberCards}
        </Row>*/}
      	<List />
      	
      	
      </div>
    )
  
}
export default connect(({ dashboard, loading }) => ({ dashboard, loading }))(Dashboard)
